package cn.myschool.java79.test2;

import cn.myschool.java79.dao.StudentMapper;
import cn.myschool.java79.entity.ExamResult;
import cn.myschool.java79.entity.Student;
import cn.myschool.java79.pojo.Student2;
import cn.myschool.java79.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class TestGetStu6 {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();

        try {
            StudentMapper mapper = s.getMapper(StudentMapper.class);
            List<Student> list = mapper.search6("李", "", "5", 1, 10);
            list.forEach(System.out::println);
            //总数
            int total = mapper.search6Total("李", "", "5");
            System.out.println(total);
        }finally {
            MybatisUtil.close(s);
        }
    }
}
